﻿using System;
using System.Collections.Generic;
using System.Text;
using AppToolKit.Core.Context.Spring;
using System.Data;

namespace BLL.Business
{
    [AutoWiring]
    public class TaskFaced
    {
        #region 

        [AutoWiring]
        public HotelBusiness HotelBusinessHolder { get; set; }
        [AutoWiring]
        public TaskBusiness TaskBusinessHolder { get; set; }
        [AutoWiring]
        public TaskListBusiness TaskListBusinessHolder { get; set; }
        
        [AutoWiring]
        public AllotMentBuesiness AllotMentBuesinessHolder { get; set; }
        #endregion

        public DataSet GetHotelAll()
        {
           return HotelBusinessHolder.GetHoteAlllList();
        }
        public DataSet GetTaskListAll(string hotelid)
        {
            return TaskListBusinessHolder.GetTaskListAll(hotelid);
        }
        public DataSet GetTaskAll(string taskList,string hotelid)
        {
            return TaskBusinessHolder.GetTaskDetailList(taskList,hotelid);
        }
        //public void SaveAlloment(string hotelid, List<string> tasklist_code)
        //{
        //    TaskFacedDaoHolder.SaveAlloment(hotelid,  tasklist_code );
        //}
        public DataSet GetTaskAll(string taskListId)
        {
           return AllotMentBuesinessHolder.GetTask(taskListId);
        }
        public DataSet GetTaskAllot(string taskListID)
        {
            return AllotMentBuesinessHolder.GetTaskAllot(taskListID);
        }
        public void AddAllot(string tasklistID, List<string> taskID)
        {
            foreach (string key in taskID)
            {
                AllotMentBuesinessHolder.AddTaskAllot(tasklistID, key);
            }
            
        }
        public void DelTaskAllot(string listID, string taskID)
        {
            AllotMentBuesinessHolder.DelTaskAllot(listID, taskID);
        }
        public void SaveAlloment(string hotelid, List<string> tasklist_code)
        {
            AllotMentBuesinessHolder.SaveAlloment(hotelid, tasklist_code);
        }
    }
}
